<?php
//http://localhost/1908php3/fenye.php?tiaonum=3&shownum=3&key=
@require_once("toubu.php");
$key=$_GET["key"];
$tiaonum=$_GET["tiaonum"];
$shownum=$_GET["shownum"];
//$sql="select * from userinfo ORDER BY id";
//str="SELECT * from goodsinfo WHERE goodsname LIKE '%$key%' 
$sql="select * from gucciinfo where goodsname like '%$key%' limit $tiaonum,$shownum ";
$result=mysql_query($sql);
$obj=array();
while($data=mysql_fetch_array($result)){
    $list=array();
    $list['goodsname']= $data['goodsname'];
    $list['goodsnum']= $data['goodsnum'];
    $list['goodsimg']= $data['goodsimg'];
    $list['goodsprice']= $data['goodsprice'];
    $list['id']= $data['id'];
    $obj[]=$list;
}
echo json_encode($obj);

